package com.lagou.demo01.service;

import com.lagou.demo01.dao.UserDao;
import com.lagou.demo01.entity.User;
import com.lagou.demo01.factory.UserDaoFactory;

public class UserService {
    private UserDao userdao;

    public UserService() {
        this.userdao = UserDaoFactory.getUSerDao();
    }

    /**
     * 自定义成员方法实现根据参数指定的user对象来调用Dao层实现登录功能
     * @param user
     * @return
     */
    public User userLoginService(User user) {
        return userdao.userLogin(user);
    }
}
